package jwcb.javapjframework.common.security.annotation;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import jwcb.javapjframework.common.security.annotation.ValueInValidator;

import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = ValueInValidator.class)
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface ValueIn {
    String message() default "值不在指定范围内";

    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};

    // 枚举类
    Class<? extends Enum<?>> enumClass();

}